﻿@using Webdiyer.WebControls.Mvc
@model PagedList<COM.DoorsWindows.Model.TypeList> 

@{
    ViewBag.Title = "Index";
}

<h2>Index</h2>

<p>
    @Html.ActionLink("Create New", "Create")
</p>

<table>
    
    <tr>
        <th>
            分类名
        </th>
       
        <th>
            创建时间
        </th>
        <th>
            操作
        </th>
    </tr>

    @foreach (var item in Model) {
        <tr>
            <td>
                @Html.DisplayFor(modelItem => item.Name)
            </td>
          
            <td>
                @Html.DisplayFor(modelItem => item.CreateTime)
            </td>
            <td>
                @Html.ActionLink("修改", "Edit", new { id=item.Id }) |
                @* @Html.ActionLink("Details", "Details", new { id=item.Id }) |*@
                @Html.ActionLink("删除", "Delete", new { id=item.Id })
            </td>
        </tr>
    }

</table>
<br/>
  @Html.Pager(Model, new PagerOptions
 {
     PageIndexParameterName = "page",
     ShowPageIndexBox = true,
     FirstPageText = "首页",
     PrevPageText = "上一页",
     NextPageText = "下一页",
     LastPageText = "末页",
     PageIndexBoxType = PageIndexBoxType.TextBox,
     PageIndexBoxWrapperFormatString = "请输入页数{0}",
     GoButtonText = "转到"
 })
<br />
     >>分页 共有 @Model.TotalItemCount 个分类 @Model.CurrentPageIndex/@Model.TotalPageCount